<div class="row oneProductView" resizable>
    <div ng-class='isPinned(windowWidth)' class="col s12 l3 m12">
        <div class="card #ea80fc purple accent-1" ng-hide='showtoken'>
            <div class="card-content grey-text text-darken-4 row" ng-hide='confirmationMenu'>
                <span class="col s12 productName grey-text text-darken-4"> {{product.name}} </span>
                <!-- <div class="col s12">Seller: {{product.userId.username}}</div> -->
                <p class="col s12 desc grey-text text-darken-4">{{product.desc}} </p>
                <div class='col s12'>
                    <h4 class="price">List:  ${{product.price}} </h4>
                    <h4 class="strike">Retail: ${{product.retailPrice}}</h4>
                </div>
                <div ng-hide='boughtItem' class='col s12'>
                    <form name='offerForm'>
                        <div class='input-field col s12'>
                            <i class='tiny mdi-editor-attach-money prefix'></i>
                            <input type='text' name='offer' class='validate' ng-model='offerPrice' placeholder='Your Offer Here' ui-validate="'$value <= product.price && $value > 0 && $value %1 === 0'"></input>
                        </div>
                        <div ng-show="offerForm.$invalid && offerForm.offer.$touched"class="col s12 center-align">Offers must be whole dollar values less than or equal to the listed price.</div>
                </div>

                <button ng-disabled='!offerForm.$valid' ng-click="submitOffer(offerPrice)" class="offerButton col s8 offset-s2 waves-effect btn blue lighten-2 grey-text text-darken-4"><i class="mdi-action-shopping-cart"></i> &nbsp Offer</button>
                <form>

                <a class="col s12 userLink blue-grey-text darken-4 btn-flat center-align" ng-click='userRedirect()'>More From {{product.userId.username}}</a>

             </div>
        </div>


        <!-- <button ng-click="userRedirect()" class="col s12 waves-effect btn blue lighten-2 grey-text text-darken-4">More from {{product.userId.username}}
        </button> -->



    </div>
    <div class="col l6 offset-l6 s12 m12">
        <div class='row'>
            <div ng-repeat="onePhotoUrl in product.photoUrls">
                <div class='col l6 m6 s12 center'>
                    <img class="responsive-img" src="{{onePhotoUrl}}" />
                </div>

            </div>
        </div>
        <div ng-controller='OneProductViewCtrl'>
            <chat chatlist='chatlist' addchat='addChat(newChat)'></chat>
        </div>
    </div>
</div>
